package cn.lili.controller.feign.member;

import cn.lili.modules.goods.client.GoodsCollectionClient;
import cn.lili.modules.member.entity.dos.GoodsCollection;
import cn.lili.modules.member.service.GoodsCollectionService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: ftyy
 * @date: 2022-01-14 10:27
 * @description: 商品收藏Feign
 */
@RestController
@RequiredArgsConstructor
public class GoodsCollectionFeignController implements GoodsCollectionClient {

    private final GoodsCollectionService goodsCollectionService;

    @Override
    public boolean isCollection(String skuId) {
        return goodsCollectionService.isCollection(skuId);
    }

    @Override
    public GoodsCollection addGoodsCollection(String skuId) {
        return goodsCollectionService.addGoodsCollection(skuId);
    }

    @Override
    public boolean deleteGoodsCollection(List<String> goodsIds) {
        return goodsCollectionService.deleteGoodsCollection(goodsIds);
    }

    @Override
    public boolean deleteSkuCollection(List<String> skuIds) {
        return goodsCollectionService.deleteSkuCollection(skuIds);
    }
}
